<!doctype html>
<html>
<head>
	<meta charset="utf-8"><meta name="format-detection" content="telephone=no">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
	<title>我的</title>
	<link rel="stylesheet" type="text/css" href="../../lib/css/skin.css"/>
</head>
<body>
<div id="root">
	<div class="app_warp">
		<div class="app_head">
			<span class="left back"></span>
			<span class="name">积分</span>
		</div>
		<div class="app_main animated fadeInUp"></div>
		<div class="nocontent animated fadeInUp hide">
			<img src="../../lib/img/loading.gif" class="minimize" alt="">
			<div class="text minimize">
				准备数据
			</div>
		</div>
	</div>
</div>
<script type="text/html" id="jifen_template">
	<div class="jifen_head">
		<span>
			<%:=integral%>
		</span>
	</div>
	<div class="jifen_intro">
		<%:=designation%>
	</div>

	<div class="app_box">
		<div class="box_tit">
					<span class="name">
						每日任务
					</span>
			<span class="more">
				已赚 <b class="skin_txt"><%:=(parseInt(signNum)+parseInt(opclassNum)+parseInt(verbNum)+parseInt(experienceNum))%></b> 可再赚<b class="skin_txt"><%:=(5-parseInt(signNum)-parseInt(opclassNum)-parseInt(verbNum)-parseInt(experienceNum))%></b>
			</span>
		</div>
		<div class="box_cont padding_box">
			<ul class="jifen_list">
				<li>
					<span class="key vcenter">
						每日签到
					</span>
					<span class="jifen_num">
						+1 (<%:=signNum%>/1)
					</span>
					<a href="javascript:;" class="<%if(integral===0){%>active <%}%>btn"><%if(signNum!==0){%>已<%}else{%>去<%}%>完成</a>
				</li>
				<li>
					<span class="key">
						看课程涨姿势
					</span>
					<span class="info">
							观看需超过10分钟
						</span>
					<span class="jifen_num">
						+1 (<%:=opclassNum%>/1)
					</span>
					<a href="javascript:;"<%if(opclassNum===0){%> tapmode onclick="getPage('viewclass')"<%}%> class="<%if(opclassNum===0){%>active <%}%>btn"><%if(opclassNum!==0){%>已<%}else{%>去<%}%>完成</a>
				</li>
				<li>
					<span class="key">
						分享
					</span>
					<span class="info">
						分享到微博、微信
					</span>
					<span class="jifen_num">
						+1 (<%:=verbNum%>/1)
					</span>
					<a href="javascript:;"<%if(verbNum===0){%> tapmode onclick="getPage('share')"<%}%> class="<%if(verbNum===0){%>active <%}%>btn"><%if(verbNum!==0){%>已<%}else{%>去<%}%>完成</a>
				</li>
				<li>
					<span class="key">
						发布心得
					</span>
					<span class="info">
						发布心得、评论楼主
					</span>
					<span class="jifen_num">
						+2 (<%:=experienceNum%>/2)
					</span>
					<a href="javascript:;"<%if(experienceNum===0){%> tapmode onclick="getPage('sendmsg')"<%}%> class="<%if(experienceNum===0){%>active <%}%>btn"><%if(experienceNum!==0){%>已<%}else{%>去<%}%>完成</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="jifen_box">
		<p class="jifen_box_tit">
			已连续签到 <b><%:=num%></b> 天，获得积分 <b>+<%:=integral%></b>
		</p>
		<ul class="clearfix">
			<%for(var i in sj){%>
			<li class="<%if(sj[i]===true){%>active<%}%>">
				<%:=(parseInt(i)+1)%> <i>日</i>
			</li>
			<%}%>
		</ul>
	</div>


	<div class="app_box">
		<div class="box_tit">
			<span class="name">
				积分规则
			</span>
		</div>
		<div class="box_cont padding_box">
			<ul class="jifen_views">
				<li>
					1.每日签到可获得积分<b class="skin_txt">+1</b>。
				</li>
				<li>
					2.观看公开课可获得积分<b class="skin_txt">+1</b>。
				</li>
				<li>
					3.分享到微博、微信、朋友圈，可获得积分<b class="skin_txt">+1</b>。
				</li>
				<li>
					4.发布心得、评论楼主，可获得积分<b class="skin_txt">+1</b>。
				</li>
				<li>
					5.每日最多可获得积分<b class="skin_txt">+5</b>。
				</li>
				<li>
					6.达到<b class="skin_txt">200</b>积分为艺考达人，达到<b class="skin_txt">500</b>积分为艺考大咖。不同积分等级可观看的课程不同。
				</li>
			</ul>
		</div>
	</div>

</script>
<script>
	var getPage=function(name){
		var index=1;
		if(name==='sendmsg'){
			index=2;
		}
		api.execScript({
			name:'index',
			script:'setFrameIndex('+index+')'
		})
		_$.sleep(function(){
			api.closeToWin({
				name:'index'
			})
		},250)
	},appready = function (){
		_$.ajax({
			interface:'getIntegral',
			call:function(data){
				_$.template('jifen_template',data.data,function(html){
					$('.app_main').html(html);
					$('.app_main,.nocontent').toggleClass('hide');
				})
				$('.app_main,.nocontent').toggleClass('hide');
				api.execScript({
					name: 'index',
					frameName:'user',
					script:'$("#jifenval").text('+data.data.integral+')'
				})
			}
		})
	};
</script>
<script src="../../lib/js/config.js"></script>
<script src="../../lib/js/jquery.js"></script>
<script src="../../lib/js/common.js"></script>
</body>
</html>